// import com->alibaba->druid->DbType*;
// import com->alibaba->druid->sql->SQLUtils;
// import com->alibaba->druid->sql->ast->SQLExpr_ptr ;
// import com->alibaba->druid->sql->ast->SQLExprImpl*;
// import com->alibaba->druid->sql->ast->SQLReplaceable*;
// import com->alibaba->druid->sql->visitor->SQLASTVisitor*;

// import java->util->ArrayList;
// import java->util->LinkedHashSet;
// import java->util->std::list;
// import java->util->Set;
#pragma once

#include <string>
#include <list>

#include "../../../DbType.h"
#include "../../SQLUtils.h"
#include "../SQLExpr.h"
#include "../SQLExprImpl.h"
#include "../SQLReplaceable.h"
#include "../../visitor/SQLASTVisitor.h"

#include "SQLBinaryOperator.h"

class SQLBinaryOpExprGroup : virtual public SQLExprImpl, virtual public SQLReplaceable
{
public:
  static string_ptr class_;
  SQLBinaryOperator_ptr operator_;
  SQLExpr_list_ptr items;
  DbType_ptr dbType;

  SQLBinaryOpExprGroup(SQLBinaryOperator_ptr operator_);

  SQLBinaryOpExprGroup(SQLBinaryOperator_ptr operator_, DbType_ptr dbType);
  SHAREDOBJECT(SQLBinaryOpExprGroup) ;
  bool equals(Object_ptr o);

  int hashCode();

  void accept0(SQLASTVisitor_ptr visitor);

  // SQLExpr_ptr clone();
  virtual SQLObject_ptr clone();
  SQLObject_list_ptr getChildren();

  void add(SQLExpr_ptr item);

  void add(int index, SQLExpr_ptr item);

  SQLExpr_list_ptr getItems();

  SQLBinaryOperator_ptr getOperator();

  string_ptr toString();

  BOOL_ptr replace(SQLExpr_ptr expr, SQLExpr_ptr target);

  void optimize();
};
